import request from '@/utils/request'

// 查询人事考核列表
export function listPersonnelMatters(query) {
  return request({
    url: '/personnelMatters/personnelMatters/list',
    method: 'get',
    params: query
  })
}

// 查询人事考核详细
export function getPersonnelMatters(personAssessmentId) {
  return request({
    url: '/personnelMatters/personnelMatters/' + personAssessmentId,
    method: 'get'
  })
}

// 新增人事考核
export function addPersonnelMatters(data) {
  return request({
    url: '/personnelMatters/personnelMatters',
    method: 'post',
    data: data
  })
}

// 修改人事考核
export function updatePersonnelMatters(data) {
  return request({
    url: '/personnelMatters/personnelMatters',
    method: 'put',
    data: data
  })
}

// 删除人事考核
export function delPersonnelMatters(personAssessmentId) {
  return request({
    url: '/personnelMatters/personnelMatters/' + personAssessmentId,
    method: 'delete'
  })
}

// 查询个人考核列表
export function ordinaryStaffList(query) {
  return request({
    url: '/personnelMatters/personnelMatters/ordinaryStaffList',
    method: 'get',
    params: query
  })
}
// 查询个人考核详细
export function ordinaryStaffGetInfo(personAssessmentId) {
  return request({
    url: '/personnelMatters/personnelMatters/ordinaryStaff/' + personAssessmentId,
    method: 'get'
  })
}

//生成当月人事考核
export function generateAppraisalForm() {
  return request({
    url: '/personnelMatters/personnelMatters/generateAppraisalForm/',
    method: 'get'
  })
}
